package com.example.gamestore.service.imp;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.gamestore.Bean.Game;
import com.example.gamestore.mapper.GameMapper;
import com.example.gamestore.service.GameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GameServiceImp implements GameService {
    @Autowired
    private GameMapper gameMapper;

    @Override
    public Page<Game> page(Page<Game> page) {
        Page<Game> page1 = gameMapper.selectPage(page, null);
        return page1;
    }

    @Override
    public List<Game> GameList() {
        List<Game> list = gameMapper.selectList(null);
        return list;
    }

    @Override
    public Game selectGameByid(Integer gameid) {
        Game game = gameMapper.selectById(gameid);
        return game;
    }
}
